import {onMounted, ref} from "vue";

const vw = ref<number>(0)
const vh = ref<number>(0)

onMounted(() => {
    vw.value = document.documentElement.clientWidth
    vh.value = document.documentElement.clientHeight
    window.addEventListener('resize', () => {
        vw.value = document.documentElement.clientWidth
        vh.value = document.documentElement.clientHeight
    })
})


export function useViewPort() {
    return [
        vw,
        vh
    ]
}
